package com.ylyq.ylxx.service.impl;

import com.ylyq.ylxx.entity.YlyqCoverPhone;
import com.ylyq.ylxx.mapper.YlyqCoverPhoneMapper;
import com.ylyq.ylxx.model.request.SaveCoverWechatRequest;
import com.ylyq.ylxx.service.IYlyqCoverPhoneService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaweichao
 * @since 2020-11-09
 */
@Service
public class YlyqCoverPhoneServiceImpl extends ServiceImpl<YlyqCoverPhoneMapper, YlyqCoverPhone> implements IYlyqCoverPhoneService {

    @Autowired
    private YlyqCoverPhoneMapper ylyqCoverPhoneMapper;

    /**
     * 功能描述：添加手机号
     * @author 577
     * @param saveCoverWechatRequest 添加的数据
     * @return
     * @date 2020/11/9
     **/
    @Override
    public int save(SaveCoverWechatRequest saveCoverWechatRequest){
        YlyqCoverPhone ylyqCoverPhone = new YlyqCoverPhone();
        BeanUtils.copyProperties(saveCoverWechatRequest,ylyqCoverPhone);
        return ylyqCoverPhoneMapper.insert(ylyqCoverPhone);
    }
}
